﻿<aw:ToolWindow
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:aw="clr-namespace:Assergs.Windows;assembly=Assergs.Windows"
    xmlns:r="clr-namespace:Bookvar.UI.Localization;assembly=Bookvar.UI"
    xmlns:commands="clr-namespace:Bookvar.UI.Commands;assembly=Bookvar.UI"
	x:Class="BookvarWpf.Windows.AddHyperlinkWindow"
	Header="{r:Resources HyperlinksHeaderText}"
	Icon="pack://application:,,,/BookvarWPF;component/Resources/Icons/16x16/Hyperlink.png"
	Style="{DynamicResource {x:Type aw:ToolWindow}}"	
	Width="408" Height="124">
    <aw:ToolWindow.InputBindings>
        <KeyBinding Command="aw:ToolWindow.CloseCommand" Key="Escape" />
    </aw:ToolWindow.InputBindings>
        <Grid>
		<Grid.Resources>
			<LinearGradientBrush x:Key="BlueButtonStyleBrush" EndPoint="0.492,0.972" StartPoint="0.494,-0.144">
				<GradientStop Color="#FFB0D3FE" Offset="0"/>
				<GradientStop Color="#FF668EC8" Offset="0.976"/>
				<GradientStop Color="#FFB0D3FE" Offset="0.388"/>
				<GradientStop Color="#FF8AA5C7" Offset="0.675"/>
			</LinearGradientBrush>
		</Grid.Resources>
		<Grid.Background>
			<LinearGradientBrush EndPoint="0.494,0.972" StartPoint="0.492,-0.144">
				<GradientStop Color="#FFD6E6FD" Offset="0.082"/>
				<GradientStop Color="#FFFFFFFF" Offset="0.673"/>
				<GradientStop Color="#FF89C2F8" Offset="1"/>
			</LinearGradientBrush>
		</Grid.Background>
		<Grid.RowDefinitions>
			<RowDefinition Height="33"  />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="100" />
			<ColumnDefinition Width="*" />
		</Grid.ColumnDefinitions>

		<TextBlock Grid.Column="0" Text="{r:Resources HyperlinksHyperlinkText}" HorizontalAlignment="Center" 
               Margin="0,0,0,3" VerticalAlignment="Center" />
		<Border HorizontalAlignment="Left"  Margin="0,0,8,0" VerticalAlignment="Center" BorderBrush="#FF85A7DB" 
            BorderThickness="1,1,1,1" Grid.Row="0" Grid.Column="1" CornerRadius="5,5,5,5" Background="#FFF0F7FF">
			<TextBox x:Name="txtHyperlink" Grid.Column="1" VerticalAlignment="Center" Width="300"
               Height="22" Grid.Row="0" BorderThickness="0,0,0,0"  />
		</Border>
		<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" FocusManager.IsFocusScope="True">
		    <Button x:Name="btnOk" Margin="0,0,8,0" IsDefault="True"           
                Height="22" BorderBrush="#FF536B88" Background="{StaticResource BlueButtonStyleBrush}"
                Click="OnOkClick" Command="commands:BookvarCommands.SaveHyperlink" CommandParameter="{Binding Text, ElementName=txtHyperlink}"
                Content="{r:Resources OkDefaultText}" />
		    <Button Command="aw:ToolWindow.CloseCommand" x:Name="btnCancel"
                Height="22" BorderBrush="#FF536B88" Background="{StaticResource BlueButtonStyleBrush}"
                Content="{r:Resources CancelDefaultText}" >
            </Button>
		</StackPanel>

	</Grid>

</aw:ToolWindow>
